<template>
  <div class="analysis">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="收益" name="profit">
        <v-profit></v-profit>
      </el-tab-pane>
      <el-tab-pane label="曲线" name="curve">
        <v-curve></v-curve>
      </el-tab-pane>
    </el-tabs>

  </div>

</template>

<script>
  import vProfit from './Profit.vue';
  import vCurve from './Curve.vue';
  // import chart from '../../../util/Chart.min.js';
  export default {
      name:'keepAilve',
      data: function () {

          return {
             activeName: 'profit'
          }
      },
      components:{
          vProfit,vCurve
      },
      created: function (){
          this.$$("#content").scrollTop(0)
        console.log("===============>created");
        console.log(this.$route.params.active);
        if(this.$route.params.active != undefined){
          this.activeName = this.$route.params.active;
        }

      },
      methods: {
        handleClick(tab, event) {
          console.log(tab, event);
        },
        commission: function () {
          console.log("==========>commission提成");
          this.$router.push({
            path:'/report'
          });

        },
        bought: function () {
          console.log("==========>bought已购");

          this.$router.push({
            path:'/bought'
          });

        }
      }

  }
</script>

<style scoped>

</style>
